package 大数的操作;

import java.math.BigDecimal;
import java.util.Scanner;

public class 高精度实数运算 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        BigDecimal a = new BigDecimal(scanner.next());
        BigDecimal b = new BigDecimal(scanner.next());

        System.out.println("+"+a.add(b));
        System.out.println("-"+a.subtract(b));
        System.out.println("*"+a.multiply(b));
        System.out.println("/"+a.divide(b,2,BigDecimal.ROUND_HALF_UP));

        // 四舍五入
        BigDecimal bigDecimal = a.setScale(3, BigDecimal.ROUND_HALF_UP);
        System.out.println(bigDecimal);
    }
}
